package com.example.demo.enumTest;

/**
 * @Author: njz
 * @Description:
 * @Date: create in 2022/9/20 14:33
 */
public enum Operate {
    ADD {
        @Override
        int apply(int a, int b) {
            return a + b;
        }
    },
    SUB {
        @Override
        int apply(int a, int b) {
            return a - b;
        }
    };
    abstract int apply(int a,int b);

}
